package com.sailfish.springbootdemo.service.db2;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.pojo.db2.*;

import javax.servlet.http.HttpServletRequest;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
import java.util.List;

public interface PcbCapacityDataService {
    /**
     * 根据条件查询能力项参数
     *
     * @param id
     * @param pcbFactoryId
     * @return
     */
    List<PcbCapacityParam> getAll(Long id, Integer pcbCapacityHistoryId, Integer pcbFactoryId, Integer pcbCapacityParamId, Integer pcbParamValueType,
                                  String pcbParamKey, String pcbParamValue, Date createTime, String createUser, Date updateTime, String updateUser,
                                  Integer status, Integer sort);

    List<PcbCapacityData> getAllData(Integer pcbCapacityHistoryId, Integer pcbFactoryId, Integer paramValueType);

    List<PcbCapacityDataHistory2> getAllDataHistory(Integer pcbFactoryId, Integer paramValueType, String version);

    Result delete(Integer id);

    Result delete(Integer pcbCapacityHistoryId, Integer pcbFactoryId);

    Result insertOrUpdate(String data);

    Result submitApprove(String data);

    Result updateApproveStatus(Integer id, String approveStatus, String remark);

    List<PcbCapacityDataApprove> getApproveList(Integer parentFactoryId, Integer factoryId, String approveStatus, Integer flowType, boolean isAll);

    Result deleteApproveData(Integer approveDataId);

    List<PcbApproveProcess> getApproveProcess(Integer dataId, Integer approveType);

    List<PcbCapacityDataApprove> getPcbCapacityDataApproveByLimit(PcbCapacityDataApprove search);

    PcbCapacityDataApprove getTemplateStatus();

    Result importH3C(HttpServletRequest req, Integer factoryId, boolean isH3c) throws IOException;

    Result clearData(Integer paramId);

    Result clearDataByFactoryId(Integer factoryId);

    boolean checkHasData(Integer paramId);

    boolean checkHasDataByFactory(Integer factoryId);


}
